package net.wofly.sale.activity.domain;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import net.wofly.sale.commodity.domain.Commodity;
import net.wofly.sale.commodity.domain.CommodityTerminal;

/**
 * 活动赠品
 *
 * @author lign
 * @version 1.0
 * @created 01-12月-2017 20:44:17
 */
@Data
@Entity
@Table(name = "sale_activity_activitygift")
@ApiModel(description = "活动礼品")
public class ActivityGift implements Cloneable {
    
    @Id
    private String activityGiftID;
    @ApiModelProperty(value = "1:赠品；2: 折扣", required = true)
    private Integer activityContent;
    @ApiModelProperty(value = "活动ID")
    private String activityID;
    @ApiModelProperty(value = "终端商品ID", required = true)
    private String commodityTerminalID;
    @ApiModelProperty(value = "折扣比例", required = true)
    private Integer discountRate;
    private Long modifyDate;
    @ApiModelProperty(value = "数量", required = true)
    private Integer num;
    
    @Transient
    @ApiModelProperty(value = "终端商品")
    private CommodityTerminal commodityTerminal;
    
    @Transient
    @ApiModelProperty(value = "商品")
    private Commodity commodity;
    
    @ApiModelProperty(value = "商品库存不足提示语")
    @Transient
    private String stockLackMsg;
    
    public ActivityGift() {
    
    }
    
    @Override
    public void finalize() throws Throwable {
    
    }
    
    @Override
    public ActivityGift clone() throws CloneNotSupportedException {
        return (ActivityGift) super.clone();
    }
}